package com.opgea.tutor.web.dto;

import com.opgea.tutor.domain.entities.Phone;
import com.opgea.tutor.domain.interfaces.Marshallable;

public class PhoneDTO implements Marshallable<Phone>{

    private String phoneNumber;
    private String description;

    public String getPhoneNumber() {
	return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
	this.phoneNumber = phoneNumber;
    }

    public String getDescription() {
	return description;
    }

    public void setDescription(String description) {
	this.description = description;
    }

    @Override
    public void marshall(Phone phone) {
	this.phoneNumber = phone.getPhoneNo();
	this.description = phone.getDescription();
    }

    @Override
    public Object unmarshall(Phone phone) {
	phone.setPhoneNo(this.phoneNumber);
	phone.setDescription(this.description);
	return phone;
    }

}
